package com.javer.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * 评论表
 * 
 * @author god
 *
 */
public class Comment implements Serializable {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * PK
	 */
	private int id;
	
	/**
	 * 公司PK
	 */
	private int tid;
	
	/**
	 * 公司名
	 */
	private String tname;
	
	/**
	 * 用户PK
	 */
	private int uid;
	
	/**
	 * IP
	 */
	private String uip;
	
	/**
	 * IP对应的地址
	 */
	private String uaddress;
	
	/**
	 * 评论类型
	 * 0 公司
	 * 1 文章
	 * 2 名人
	 */
	private int ctype;
	
	/**
	 * 评论内容
	 */
	private String content;
	
	/**
	 * 支持
	 */
	private int agree;
	
	/**
	 * 反对
	 */
	private int disagree;
	
	/**
	 * 评论时间
	 */
	private Date ctime;
	
	/**
	 * row number
	 */
	private int orderNo;

	public int getAgree() {
		return agree;
	}

	public void setAgree(int agree) {
		this.agree = agree;
	}

	public int getDisagree() {
		return disagree;
	}

	public void setDisagree(int disagree) {
		this.disagree = disagree;
	}

	public String getTname() {
		return tname;
	}

	public void setTname(String tname) {
		this.tname = tname;
	}

	public int getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(int orderNo) {
		this.orderNo = orderNo;
	}

	public String getUaddress() {
		return uaddress;
	}

	public void setUaddress(String uaddress) {
		this.uaddress = uaddress;
	}

	public String getUip() {
		return uip;
	}

	public void setUip(String uip) {
		this.uip = uip;
	}

	public int getCtype() {
		return ctype;
	}

	public void setCtype(int ctype) {
		this.ctype = ctype;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getTid() {
		return tid;
	}

	public void setTid(int tid) {
		this.tid = tid;
	}

	public int getUid() {
		return uid;
	}

	public void setUid(int uid) {
		this.uid = uid;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getCtime() {
		return ctime;
	}

	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}

	@Override
	public String toString() {
		return "Comment [tid=" + tid + ", content=" + content + ", ctime="
				+ ctime + ", id=" + id + ", uid=" + uid + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Comment other = (Comment) obj;
		if (id != other.id)
			return false;
		return true;
	}
	
}
